package io.renren.modules.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.demo.dao.LeaveMeaasgeDao;
import io.renren.modules.demo.dto.LeaveMeaasgeDTO;
import io.renren.modules.demo.entity.LeaveMeaasgeEntity;
import io.renren.modules.demo.service.LeaveMeaasgeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2021-05-24
 */
@Service
public class LeaveMeaasgeServiceImpl extends CrudServiceImpl<LeaveMeaasgeDao, LeaveMeaasgeEntity, LeaveMeaasgeDTO> implements LeaveMeaasgeService {

    @Autowired
    private LeaveMeaasgeDao leaveMeaasgeDao;

    @Override
    public QueryWrapper<LeaveMeaasgeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<LeaveMeaasgeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }

    @Override
    protected Class<LeaveMeaasgeDTO> currentDtoClass() {
        return super.currentDtoClass();
    }

    @Override
    public PageData<LeaveMeaasgeDTO> page(Map<String, Object> params) {
        return null;
    }

    @Override
    public List<LeaveMeaasgeDTO> list(Map<String, Object> params) {
        return super.list(params);
    }

    @Override
    public LeaveMeaasgeDTO get(Long id) {
        return super.get(id);
    }

    @Override
    public void save(LeaveMeaasgeDTO dto) {
        super.save(dto);
    }

    @Override
    public void update(LeaveMeaasgeDTO dto) {
        super.update(dto);
    }

    @Override
    public void delete(Long[] ids) {
        super.delete(ids);
    }
}